#ifndef DVLINECHART_H
#define DVLINECHART_H

#include <qwt_plot.h>
#include <qwt_series_data.h>
#include <QMap>

class QwtPlotCurve;
class QwtLegend;

class dvLineChart : public QwtPlot
{
    Q_OBJECT

public:
    dvLineChart(QWidget *parent = 0);
    ~dvLineChart();

    void clear();

    void setDates(const QStringList& list);

    void insertCurve( const QString &title, int regionId,
                      const QVector<QPointF> &points, const QColor &color);

    void showLegend(bool show);

    void showCurve(int region, bool show);

    void setHiddenAllCurve(bool hidden);

    void setCheckedItemsLegend();

    void setSplineCurves(bool spline);

private slots:
    void showItem(QwtPlotItem *, bool on);

private:
    bool m_fittedSpline;
    bool m_showLegend;
    QwtLegend *m_pLegend;
    QMap<int, QwtPlotCurve*> m_curves;
    QStringList              m_dates;
};

#endif // DVLINECHART_H
